package com.cpi.cornpp.futurepurchase.dto;

import java.io.Serializable;
import java.sql.Date;

public class FuturePurchaseDTO implements Serializable{
	/** Serial Id */
	private static final long serialVersionUID = -787395724636965547L;
	/** Default order */
	public static final String DEFAULT_ORDER = "account_future_period_id";
	/** Default order */
	public static final String PERIOD_ACCOUNT = "corn_futures.application_future_period_id";
	/** Column name quantity */
	public static final String QUANTITY = "corn_futures.quantity";
	/** Column name unit price */
	public static final String UNIT_PRICE = "unit_price";
	/** Column name unit price */
	public static final String CORN_ORIGIN = "corn_origin_id";
	/** Column name unit price */
	public static final String PRICE = "unit_price * ( ( corn_futures.quantity / (select qty from units where unit_id = 'CON') ) / (select qty from units where unit_id = 'BUS') )";	
	
	public static final String ACCOUNT_FUTURE_PERIOD_NAME = "account_future_period_id";
	public static final String APPLICATION_FUTURE_PERIOD_NAME =  "corn_futures.application_future_period_id";	
	public static final String REFERENCE = "corn_futures.reference";
	public static final String TOTAL_QUANTITY = "corn_futures.quantity";
	public static final String AVAILABLE = "available";
	public static final String UNITPRICE = "corn_futures.unit_price";
	
	
	private int cornFutureId;
	private int accountFuturePeriodId;
	private int applicationFuturePeriodId;
	private String accountFuturePeriodName;
	private String applicationFuturePeriodName;
	private Double availables;
	private double quantityAssigned;
	private boolean futureAssigned;
	private double price;
	
	
	public double getQuantityAssigned() {
		return quantityAssigned;
	}
	public void setQuantityAssigned(double quantityAssigned) {
		this.quantityAssigned = quantityAssigned;
	}
	public boolean isFutureAssigned() {
		return futureAssigned;
	}
	public void setFutureAssigned(boolean futureAssigned) {
		this.futureAssigned = futureAssigned;
	}
	public String getAccountFuturePeriodName() {
		return accountFuturePeriodName;
	}
	public void setAccountFuturePeriodName(String accountFuturePeriodName) {
		this.accountFuturePeriodName = accountFuturePeriodName;
	}
	public String getApplicationFuturePeriodName() {
		return applicationFuturePeriodName;
	}
	public void setApplicationFuturePeriodName(String applicationFuturePeriodName) {
		this.applicationFuturePeriodName = applicationFuturePeriodName;
	}
	private String reference;
	private int quantity;
	private Date purchaseDate;
	private String unitPrice;
	private Date updated;
	private String periodDescription;
	private String cornOrigin;
	
	public String getPeriodDescription() {
		return periodDescription;
	}
	public void setPeriodDescription(String periodDescription) {
		this.periodDescription = periodDescription;
	}
	public int getCornFutureId() {
		return cornFutureId;
	}
	public void setCornFutureId(int aCornFutureId) {
		cornFutureId = aCornFutureId;
	}
	public int getAccountFuturePeriodId() {
		return accountFuturePeriodId;
	}
	public void setAccountFuturePeriodId(int aPeriodId) {
		accountFuturePeriodId = aPeriodId;
	}
	public int getApplicationFuturePeriodId() {
		return applicationFuturePeriodId;
	}
	public void setApplicationFuturePeriodId(int aPeriodYear) {
		applicationFuturePeriodId = aPeriodYear;
	}
	public String getReference() {
		return reference;
	}
	public void setReference(String aReference) {
		reference = aReference;
	}
	public int getQuantity() {
		return quantity;
	}
	public void setQuantity(int aQuantity) {
		quantity = aQuantity;
	}
	public Date getPurchaseDate() {
		return purchaseDate;
	}
	public void setPurchaseDate(Date aPurchaseDate) {
		purchaseDate = aPurchaseDate;
	}
	public String getUnitPrice() {
		return unitPrice;
	}
	public void setUnitPrice(String aUnitPrice) {
		unitPrice = aUnitPrice;
	}
	public Date getUpdated() {
		return updated;
	}
	public void setUpdated(Date aUpdated) {
		updated = aUpdated;
	}
	public Double getAvailables() {
		return availables;
	}
	public void setAvailables(Double availables) {
		this.availables = availables;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public double getPrice() {
		return price;
	}
	public String getCornOrigin() {
		return cornOrigin;
	}
	public void setCornOrigin(String cornOrigin) {
		this.cornOrigin = cornOrigin;
	}
	
}